'use strict';

/**
 * 账号schema
 */
const mongoose = require('mongoose'), Schema = mongoose.Schema;

const accountSchema = new Schema({
    _id: {type: String}, //账号
    u_nm: {type: String, required: true}, //用户名
    u_pw: {type: String, required: true}, //登录密码
    u_ro: {type: Number, required: true}, //角色 1：管理员，2：人事，3：运营
    u_em: {type: String}, //邮箱
    c_id: {type: String}, //创建者
    m_id: {type: String}, //更新者
}, {timestamps: {createdAt: 'c_at', updatedAt: 'm_at'}});

module.exports = mongoose.model('AccountModel', accountSchema, "account");
